import request from '@/utils/request'

// 添加便签
export function addSticky(data) {
  return request({
    url: '/sticky/add',
    method: 'post',
    data
  })
}

// 修改便签
export function updateSticky(data) {
  return request({
    url: '/sticky/update',
    method: 'post',
    data
  })
}

// 删除便签
export function deleteSticky(id) {
  return request({
    url: '/sticky/delete',
    method: 'post',
    params: {
      id
    }
  })
}

// 获取便签详情
export function getStickyDetail(id) {
  return request({
    url: '/sticky/detail',
    method: 'get',
    params: {
      id
    }
  })
}

// 获取用户的所有便签
export function getStickyList() {
  return request({
    url: '/sticky/list',
    method: 'get'
  })
}

// 分页查询便签
export function getStickyPage(params) {
  return request({
    url: '/sticky/page',
    method: 'get',
    params
  })
} 